//无小数点
let num1 = '1321434322222'
let num11 = num1.replace(/(\d)(?=(\d{3})+$)/g,'$1,')
//有小数点
let num2 = '342243242322.3432423'
let num22 = num2.replace(/(\d)(?=(\d{3})+\.)/g,'$1,')
console.log('num1',num11);
console.log('num2',num22)
